import request from '@/utils/request'

export function all() {
  return request({
    url: 'rest/api/manager/notice/all',
    method: 'get'
  })
}

export function queryComponent(id) {
  return request({
    url: 'rest/api/notice/' + id,
    method: 'get'
  })
}

export function entity(id) {
  return request({
    url: 'rest/api/manager/notice/entity?ids=' + id,
    method: 'get'
  })
}
export function getComponent(params) {
  return request({
    url: 'rest/api/notice/object',
    method: 'get',
    params
  })
}

export function updateComponent(data) {
  return request({
    url: 'rest/api/notice/object',
    method: 'post',
    data
  })
}

export default { all, entity, queryComponent, getComponent, updateComponent }
